﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AsscerMVCN2512.Models
{
    public class ActionLoginFiler:ActionFilterAttribute
    {
        public bool IsCheck { get; set; }
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            //base.OnActionExecuting(filterContext);
            if (IsCheck)
            {
                if (filterContext.HttpContext.Session["user"] == null)
                {
                    filterContext.HttpContext.Response.Redirect("/EmpolyInfo/LoginProject");
                }
            }
        }
    }
    
}